/**
 * Created by linxiaofen on 2017/5/28.
 */
'use strict';
app.component('contactMe',{
        templateUrl:'./view/template/contact.html',
        controller:function(httpService, $timeout){
            var ctrl = this;
            httpService.getContactInfo.query(function(data){
                ctrl.data = data;
            });
            angular.element(document).ready(function () {
                scrollBarsCtrl();
            });
            ctrl.showMessage = function(){
                modalService.showModal();
            };
            function scrollBarsCtrl(){
                if(window.matchMedia("(max-width: 800px)").matches){
                    $("#contact").mCustomScrollbar("destroy");
                }else{
                    $("#contact").mCustomScrollbar({
                        theme: "dark-2",
                        contentTouchScroll: true,
                        advanced: {
                            updateOnContentResize: true,
                            updateOnBrowserResize: true,
                            autoScrollOnFocus: false
                        }
                    });
                }
            }


        }

});